'use strict';
import React, { createClass, PropTypes } from 'react'
import { Link } from 'react-router'

const TestGroupList = createClass({
    render() {
        const { listData } = this.props;

        let listLoading = '';
        return (<ul className="list-group test-group-list">
            {
                listData.map((item, idx) => {
                    let linkTo = {pathname:'/test_paper/'+ item.id};
                    return (
                        <li className="list-group-item question" key={idx}>
                            <h3 className="heading">
                                <Link to={linkTo} className="lnk">{item.title}</Link>
                            </h3>
                        </li>
                    );
                })
            }
            {listLoading}
        </ul>)
    }
});

export default TestGroupList;